<form class="form-vertical" role="form" name="bookForm"
    data-ng-submit="addBook()"
>
    <div class="row">
        <div class="col-lg-8">
            <div class="form-group" style="margin-top: 10px;">
                <input type="text" class="form-control" required="required" name="title" placeholder="Enter book title"
                    data-ng-model="book.title"
                />
            </div>

            <div class="form-group">
                <textarea name="book.description" class="form-control editable-textarea" required="required" placeholder="Enter book description"
                    data-ng-model="book.description"
                >{book.description}</textarea>
            </div>

            <div class="visible-lg">
                <button type="submit" class="btn btn-primary"
                    data-ng-disabled="!bookForm.$valid"
                >
                    Save
                </button>
            </div>
        </div>

        <div class="col-lg-4">
            <h4 class="text-muted">Information</h4>
            <table class="table">
                <tr>
                    <th style="vertical-align: middle;">Author</th>
                    <td>
                        <select name="author" class="form-control" required="required"
                            data-ng-model="book.author"
                            data-ng-options="author.id as author.name for author in authors"
                        >
                            <option value="">Select an author</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <th>Released</th>
                    <td>
                        <datepicker
                            data-ng-model="book.releaseDate"
                            data-min-mode="year"
                            data-datepicker-mode="'year'"
                        ></datepicker>
                    </td>
                </tr>
            </table>

            <div class="hidden-lg">
                <button type="submit" class="btn btn-primary"
                    data-ng-disabled="!bookForm.$valid"
                >
                    Save
                </button>
            </div>
        </div>
    </div>
</form>